﻿///***************************************************************
/// 시  스  템 : Updms.Bby.Dac
/// 단위시스템 : BBY
/// 계      층 : Data Access Layer
/// 프로그램명 : Bby_Dac_UPDMS_BBY_GROWTH
/// 파  일  명 : Bby_Dac_UPDMS_BBY_GROWTH.cs
/// 설      명 : 성장관리
///***************************************************************
/// 수정ID 일자       이름     내용
///---------------------------------------------------------------
/// CH001  2010-01-20 송시명   최초 작성
///***************************************************************
using System.Data;
using System.Data.SqlClient;
using System.EnterpriseServices;
using System.Reflection;
using System.Runtime.InteropServices;

using SMFramework.Data;

namespace Updms.Bby.Dac
{
	[ComVisible(true)]
	[Transaction(TransactionOption.Supported)]
	[JustInTimeActivation(true)]
	public class Bby_Dac_UPDMS_BBY_GROWTH : Base.AppFramework.DacBase
	{
		public Bby_Dac_UPDMS_BBY_GROWTH()
		{
		}

		#region NT [GetSearchCount]
		
		[AutoComplete]
		public int GetSearchCount(DataPack lo_dp)
		{
			string ls_curr_method = MethodBase.GetCurrentMethod().DeclaringType.ToString() + " - " + MethodBase.GetCurrentMethod().ToString();
			string strSql = "usp_UPDMS_BBY_GROWTH_Get_Search_Count";
			
			SqlParameter[] paramArray = lo_dp.ToSqlParameters();
			
			return (int)_agent.ExecuteScalar(strSql, paramArray, CommandType.StoredProcedure, ls_curr_method);
		}
		
		#endregion

		#region NT [SelectProcess]
		
		[AutoComplete]
		public DataSet SelectProcess(DataPack lo_dp)
		{
			string ls_curr_method = MethodBase.GetCurrentMethod().DeclaringType.ToString() + " - " + MethodBase.GetCurrentMethod().ToString();
			string strSql = "usp_UPDMS_BBY_GROWTH_Select_Paging";

			SqlParameter[] paramArray = lo_dp.ToSqlParameters();

			//데이터팩 로깅
			//Base.AppFramework.SMEventLog.WriteDataLog(ls_curr_method, lo_dp);

			DataSet ds = new DataSet();
			return _agent.Fill(strSql, "UPDMS_BBY_GROWTH", ds, paramArray, CommandType.StoredProcedure, ls_curr_method);
		}
		
		#endregion

		#region RT [Insert]
		
		[AutoComplete]
		public int Insert(DataPack lo_dp)
		{
			string ls_curr_method = MethodBase.GetCurrentMethod().DeclaringType.ToString() + " - " + MethodBase.GetCurrentMethod().ToString();
			string strSql = "usp_UPDMS_BBY_GROWTH_Insert";

			//데이터팩 로깅
			//Base.AppFramework.SMEventLog.WriteDataLog(ls_curr_method, lo_dp);

			SqlParameter[] paramArray = lo_dp.ToSqlParameters();
			return _agent.ExecuteNonQuery(strSql, paramArray, CommandType.StoredProcedure, ls_curr_method);
		}
		
		#endregion

		#region RT [Update]
		
		[AutoComplete]
		public int Update(DataPack lo_dp)
		{
			string ls_curr_method = MethodBase.GetCurrentMethod().DeclaringType.ToString() + " - " + MethodBase.GetCurrentMethod().ToString();
			string strSql = "usp_UPDMS_BBY_GROWTH_Update";

			//데이터팩 로깅
			//Base.AppFramework.SMEventLog.WriteDataLog(ls_curr_method, lo_dp);
			
			SqlParameter[] paramArray = lo_dp.ToSqlParameters();
			return _agent.ExecuteNonQuery(strSql, paramArray, CommandType.StoredProcedure, ls_curr_method);
		}
		
		#endregion

		#region RT [Delete]
		
		[AutoComplete]
		public int Delete(string ls_xml)
		{
			string ls_curr_method = MethodBase.GetCurrentMethod().DeclaringType.ToString() + " - " + MethodBase.GetCurrentMethod().ToString();
			string strSql = "usp_UPDMS_BBY_GROWTH_Delete";

			SqlParameter[] paramArray =
			{
				new SqlParameter("ls_xml", ls_xml)
			};
			
			return _agent.ExecuteNonQuery(strSql, paramArray, CommandType.StoredProcedure, ls_curr_method);
		}
		
		#endregion
	}
}
